package cn.wolfcode.luowowo.search.domain;

import cn.wolfcode.luowowo.search.vo.TouristVo;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Document(indexName="luowowo_route",type="route")
@Getter
@Setter
public class RouteTemplate implements Serializable {
    @Id
    //@Field 每个文档的字段配置（类型、是否分词、是否存储、分词器 ）
    @Field(store=true, index = false,type = FieldType.Long)
    private Long id;  //路线id
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String name;//路线名称
    @Field(index=true,store=true,type = FieldType.Keyword)
    private Long themeId;
    @Field(index=true,store=true,type = FieldType.Keyword)
    private Long themeSortId;//标签分类的id
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String themeCoverUrl;//标签图片
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String themeName;//标签名字
    @Field(index=true,store=true,type = FieldType.Keyword)
    private Long destId;//目的地的id
    @Field(index=true,store=true,type = FieldType.Keyword)
    private List<TouristVo> tourists;//景点
    @Field(index=true,store=true,type = FieldType.Integer)
    private Integer days;//天数
    @Field(index=true,store=true,type = FieldType.Keyword)
    private Date creatTime;//创建时间
    @Field(index=true,store=true,type = FieldType.Keyword)
    private Long bestTimeId;//最佳时间id
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String bestTimeName;//最佳时间字段
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String bestTimeSort;//最佳时间分类  1为月份、二为节假
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String bestTimeoverUrl;//最佳时间图片
    @Field(index=true,store=true,type = FieldType.Keyword)
    private Integer hotNum;//热度
}